import java.util.*;

/**
 *  The class, which extend the super class Publication, represent a Journal Article.
 * 
 * @author (your name)
 * @version (a version number or a date)
 */
public class JournalArticle extends Publications {
	private String journal;
	/**
	 * Construct a JournalArticle object with the specified list of author, title, 
     * year of publication, ISSN code, ISBN code and journal name.
     * The ISSN code must be a numeric string of 8 character.
     * The ISBN code must be a numeric string of 13 character
     * ISSN and ISBN code can also be initialized at null.
     * 
	 * @param theAuthors the list of author object.
     * @param aTitle the title of journal.
     * @param aYear the year of publication.
     * @param aIssn the ISSN code.
     * @param aIsbn the ISBN code.
	 * @param aJournal the name of the article.
	 */
	public JournalArticle(List<Author> theAuthors, String aTitle, int aYear,
			String aIssn, String aIsbn, String aJournal) {
		super(theAuthors, aTitle, aYear, aIssn, aIsbn);
		if (!aJournal.equals(""))
			this.journal = aJournal;
		else 
			throw new IllegalArgumentException();
	}
	/**
	 * Return the name of the article.
	 * 
	 * @return the name.
	 */
	public String getJournal() {
		return journal;
	}

	@Override
	/**
	 * Return the string representation of the journal article.
	 * 
	 * @return the string representation.
	 */
	public String toString() {
		return "JournalArticle [journal=" + journal + ", " + super.toString()
				+ "]";
	}

}
